package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.Travel;
import cn.wolfcode.trip.base.query.QueryObject;
import cn.wolfcode.trip.base.query.StrategyTravelQuery;
import cn.wolfcode.trip.base.query.TravelQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface TravelMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Travel record);

    Travel selectByPrimaryKey(Long id);

    List<Travel> selectAll();

    int updateByPrimaryKey(Travel record);

    List<Travel> selectForList(TravelQuery qo);

    void changeState(Travel travel);

    List<Travel> selectStrategyTravel(StrategyTravelQuery qo);

    List<Travel> selectForStravel(QueryObject qo);

    void updateLikeNum(Long id);

    void updateLikeNumByDelete(Long relationId);

    void updateShowNum(@Param("travelId") Long travelId);

    int getByUserId(@Param("userId") Long userId);
}